<%--
  Created by IntelliJ IDEA.
  User: 王宝田
  Date: 2022/6/28
  Time: 12:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>Title</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<style>
    .fl {
        float: left;
    }

    .fr {
        float: right;
    }

    body {
        margin: 0;
    }

    .pg-header {
        margin: 0 auto;
        height: 48px;
        background-color: #2369ec;
    }

    .pg-content .menu {
        width: 200px;
        position: fixed;
        top: 48px;
        left: 0;
        bottom: 0;
        background-color: #3fcfe8;
    }

    .pg-content .content {
        position: fixed;
        top: 48px;
        left: 200px;
        right: 0;
        bottom: 0;
        overflow: auto;
    }
</style>
<body>
<div class="pg-header">教学互动系统学生端</div>
<div class="pg-content">
    <div class="menu fl">
        <ul class="nav">
            <li >
                个人信息
            <ul class="sub">
                <li ><a href="javascript:void(0);" onclick="loadPage('message');">我的信息</a> </li>
                <li><a href="javascript:void(0);" onclick="loadPage('updatepassword');">修改密码</a> </li>
            </ul>
            </li>
            <li >
                作业
                <ul class="sub">
                    <li><a href="javascript:void(0);" onclick="loadPage('studentWork');">查看作业</a> </li>
                </ul>
            </li>
            <li>
                <a href="exit">退出</a>
            </li>
        </ul>
    </div>
    <div class="content">

    </div>
</div>
<div class="pg-footer"></div>
<script type="text/javascript">

  function loadPage(url){
      $.ajax({
          url:url,
          cache:false,
          async:true,
          dataType:'html',
          success:function (data){
              document.getElementsByClassName("content").innerHTML=data;
              alert("成功")
          },error:function (){
              alert("失败")

          }
      });
  }

</script>
</body>
</html>
